import { Space, Button } from "antd"
import { useNavigate } from "react-router-dom";
import "./home.css"
export default function Home() {

    const navigate = useNavigate()

    const routeList = [
        {
            title: "刀版设计",
            path: "/dban"
        },
        {
            title: "Hook",
            path: "/hook"
        }
    ]

    const handleClick = (path: string) => {
        navigate(path)
    }


    return (
        <div className="home">
            <Space>
                {
                    routeList.map((item, index) => {
                        return <Button key={index} type="primary" onClick={() => handleClick(item.path)}>{item.title}</Button>
                    })
                }
            </Space>
        </div>
    )
}
